package com.aptemo.webetek.shared;

import java.util.ArrayList;

import com.aptemo.webetek.client.commands.Response;

public class PagingResult<T> implements Response
{

	private ArrayList<T>	list;
	private String			cursor;
	private int				totalCnt	= -1;

	public int getTotalCnt()
	{
		return totalCnt;
	}

	protected PagingResult()
	{
	}

	public PagingResult(ArrayList<T> list, String cursor)
	{
		this(list, cursor, -1);
	}

	public PagingResult(ArrayList<T> list, String cursor, int totalCnt)
	{
		this.list = list;
		this.cursor = cursor;
		if (totalCnt >= 0)
		{
			this.totalCnt = totalCnt;
		}
	}

	public ArrayList<T> getList()
	{
		return list;
	}

	public String getCursor()
	{
		return cursor;
	}
}
